//
//  THMineGroupTableViewCell.m
//  TreeHole
//
//  Created by apple on 2020/9/1.
//  Copyright © 2020 stoneobs. All rights reserved.
//

#import "THMineEarningsTableViewCell.h"

@interface THMineEarningsTableViewCell()


@property(nonatomic, strong) STLabel                     *nameLable;/**<  */
@property(nonatomic, strong) STLabel                     *timeLable;/**<  */
@property(nonatomic, strong) STLabel                     *moneyLable;/**<  */
@end
@implementation THMineEarningsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self stoneobs_ui_configSubView];
    }
    return self;
}
+ (CGFloat)stoneobs_ui_cell_height{
    return 60;
}
#pragma mark --configSubView
- (void)stoneobs_ui_configSubView{
    
    
    ({
        STLabel * stoneobs_ui_label = [[STLabel alloc] initWithFrame:CGRectMake(10, 5, 300, 20)
                                                                text:@"sasd"
                                                           textColor:STONEOBS_UI_FIRST_TEXT_COLOR
                                                                font:13
                                                         isSizetoFit:NO
                                                       textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:stoneobs_ui_label];
        stoneobs_ui_label.font = [UIFont fontWithName:STONEOBS_UI_FONT_CU_NAME size:13];
        self.nameLable = stoneobs_ui_label;
    });
    

    
    ({
        STLabel * stoneobs_ui_label = [[STLabel alloc] initWithFrame:CGRectMake(10, 0, 300 , 20)
                                                                text:@"sasd"
                                                           textColor:STONEOBS_UI_THIRD_TEXT_COLOR
                                                                font:13
                                                         isSizetoFit:NO
                                                       textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:stoneobs_ui_label];
        self.timeLable = stoneobs_ui_label;
        stoneobs_ui_label.bottom = self.class.stoneobs_ui_cell_height - 5;
    });
    
    ({
        STLabel * stoneobs_ui_label = [[STLabel alloc] initWithFrame:CGRectMake(0, 0, 60 , self.class.stoneobs_ui_cell_height)
                                                                text:@"sasd"
                                                           textColor:STONEOBS_UI_FIRST_TEXT_COLOR
                                                                font:14
                                                         isSizetoFit:NO
                                                       textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:stoneobs_ui_label];
        stoneobs_ui_label.font = [UIFont fontWithName:STONEOBS_UI_FONT_CU_NAME size:14];
        self.moneyLable = stoneobs_ui_label;
        stoneobs_ui_label.right = UISCREEN_WIDTH - 10;
    });
}
- (void)setModel:(THAccountFlowtModel *)model{
    _model = model;

    self.nameLable.text = model.title;
    self.timeLable.text = model.updated_at;
    self.moneyLable.text = model.amount;
    if (model.amount.floatValue < 1) {
        self.moneyLable.text = model.integral;
    }
    if (model.updated_at.length < 1) {
        self.timeLable.text = model.created_at;
    }
}
@end
